import React, { Component } from 'react';
// react 高阶组件实现第二种方式   反向继承

class App extends Component {
  render() {
    return (
      <div>
        <h1>App组件</h1>
      </div>
    );
  }
}
function HigherOrderComponent(Cmp){
  // Cmp=>App
  // return class entends App
  // super=>App
return class extends Cmp{
  render(){

    let tree = super.render();
    console.log(tree);
// return <Cmp></Cmp>
    return tree
  }
}
}
export default HigherOrderComponent(App);
